import time

import requests


def send_request(url, headers, max_retries=3):
    """请求函数"""
    for i in range(max_retries):
        try:
            response = requests.get(url, headers=headers).text
            return response

        except requests.exceptions.RequestException as e:
            print(f"请求失败，错误信息：{e}")
            print("正在重试...")
            time.sleep(1)
    print("请求失败，已达到最大重试次数")
    return None
